sum1 = 0
for a in range(18, 989, 10):
    if (a // 10 % 2 != 0):
        sum1 += a
    else:
        sum1 -= a
print(sum1)
